< previous page page_39 next page >

Page 39
ForeColor Property
The ForeColor property specifies the foreground color of an object. For controls such as labels and text boxes, this is the color of the text. For graphic methods like Line and Circle, this is the color of the line or circle.
BackColor Property
BackColor specifies the background color of an object. If you change the BackColor property of a form or picture box, all graphics are erased and the drawing object is filled with the new color whether or not AutoRedraw is true.
BackStyle Property
The label control displays its background only if its BackStyle property is set to vbBSSolid. If BackStyle is vbTransparent, whatever lies behind the label shows through.
FillColor Property
The FillColor property specifies the color used to fill closed shapes such as rectangles, circles, and pie slices. If the FillStyle property is vbFSTransparent (the default value), this property is ignored.
AutoSize Property
AutoSize determines whether a picture box adjusts its Width and Height to fit the picture it contains. If this value is true when you load a bitmap into a picture box, the picture box shrinks or expands to fit the bitmap exactly.
CurrentX and CurrentY Properties
The CurrentX and CurrentY properties give the coordinates of the next point for use in graphic output. When you execute a graphic method like Line or PSet, Visual Basic sets these properties to indicate the last point drawn. You can use this point as the start of the next drawing operation. This method is commonly used to draw a sequence of connected lines like this:
e10a6a0a59f035e870d90cca05b85fce.gif
' This sets (CurrentX, CurrentY) to (100, 100). 
Line (100, 100)

' Subsequent lines start at (CurrentX, CurrentY) and then 
' update (CurrentX, CurrentY) to the end of the next line. 
Line -(200, 300) 
Line -(300, 200) 
Line -(400, 250) 
     etc.

 
< previous page page_39 next page >